<xx-toolbar></xx-toolbar>

<md-content layout-fill>
    <div layout="column" layout-align="center center">
        <div style="padding-top: 5%"></div>

        <div layout="column" layout-align="center ">
            <md-input-container>
                <label>用户名（2-16位，仅支持字母、数字、下划线）</label>
                <input ng-model="user.username" required>
                <div ng-if="!trueUsername" class="warn">用户名格式不正确</div>
            </md-input-container>
            <md-input-container>
                <label>密码（至少6位）</label>
                <input ng-model="user.password" required>
                <div ng-if="!truePwd" class="warn">密码长度不正确</div>
            </md-input-container>
            <md-input-container>
                <label>手机号码</label>
                <input ng-model="user.phone" required>
                <div ng-if="!truePhone" class="warn">手机号格式不正确</div>
            </md-input-container>
            <div layout-gt-xs="row" layout-align="space-between center">
                <md-content layout="row" layout-align="center center">
                    <md-button ng-click='register(user)' class="md-raised md-warn">注册</md-button>
                </md-content>
                <md-content layout="row" layout-align="center center">
                    <md-button ng-click='login()' class="md-raised md-primary">返回</md-button>
                </md-content>
            </div>
        </div>
    </div>
    <br><br><br><br>
</md-content>
